home *** CD-ROM | disk | FTP | other *** search
/ Scene 96 / Scene 96 International Edition (Zyklop Software) (Disc 2) (1997).iso / misc / coding / cp2dekit / h / mcp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-12-29  |  2.4 KB  |  91 lines

  1. //***************************************************************************
  2. //
  3. // this file is (c) '94-'96 Niklas Beisert
  4. //
  5. // this file is part of the cubic player development kit.
  6. // you may only use/modify/spread this file under the terms stated
  7. // in the cubic player development kit accompanying documentation.
  8. //
  9. //***************************************************************************
  10.  
  11. #ifndef __MCP_H
  12. #define __MCP_H
  13.  
  14. struct sampleinfo
  15. {
  16.   unsigned long type;
  17.   void *ptr;
  18.   long length;
  19.   long samprate;
  20.   long loopstart;
  21.   long loopend;
  22.   long sloopstart;
  23.   long sloopend;
  24. };
  25.  
  26. #define MCP_INVERTL 1
  27. #define MCP_INVERTR 2
  28.  
  29. enum
  30. {
  31.   mcpSampUnsigned=1,
  32.   mcpSampDelta=2,
  33.   mcpSamp16Bit=4,
  34.   mcpSampBigEndian=8,
  35.   mcpSampLoop=16,
  36.   mcpSampBiDi=32,
  37.   mcpSampSLoop=64,
  38.   mcpSampSBiDi=128,
  39.   mcpSampRedBits=0x80000000,
  40.   mcpSampRedRate2=0x40000000,
  41.   mcpSampRedRate4=0x20000000,
  42. };
  43.  
  44. enum
  45. {
  46.   mcpMasterVolume, mcpMasterPanning, mcpMasterBalance, mcpMasterSurround,
  47.   mcpMasterSpeed, mcpMasterPitch, mcpMasterBass, mcpMasterTreble,
  48.   mcpMasterReverb, mcpMasterChorus, mcpMasterPause, mcpMasterFilter,
  49.   mcpMasterAmplify,
  50.   mcpGSpeed,
  51.   mcpCVolume, mcpCPanning, mcpCPanY, mcpCPanZ, mcpCSurround, mcpCPosition,
  52.   mcpCPitch, mcpCPitchFix, mcpCPitch6848, mcpCStop, mcpCReset,
  53.   mcpCBass, mcpCTreble, mcpCReverb, mcpCChorus, mcpCMute, mcpCStatus,
  54.   mcpCInstrument, mcpCSetLoop, mcpCSetDir,
  55.   mcpGTimer,
  56. };
  57.  
  58. int mcpReduceSamples(sampleinfo *s, int n, long m, int o);
  59. enum
  60. {
  61.   mcpRedAlways16Bit=1,
  62.   mcpRedNoPingPong=2,
  63.   mcpRedGUS=4,
  64. };
  65.  
  66. extern int mcpNChan;
  67.  
  68. extern int (*mcpLoadSamples)(sampleinfo* si, int n);
  69. extern int (*mcpOpenPlayer)(int, void (*p)());
  70. extern void (*mcpClosePlayer)();
  71. extern void (*mcpSet)(int ch, int opt, int val);
  72. extern int (*mcpGet)(int ch, int opt);
  73. extern void (*mcpGetRealVolume)(int ch, int &l, int &r);
  74. extern void (*mcpGetRealMasterVolume)(int &l, int &r);
  75. extern void (*mcpGetMasterSample)(short *s, int len, int rate, int mode);
  76. extern int (*mcpGetChanSample)(int ch, short *s, int len, int rate);
  77. extern int (*mcpAddChanSample)(int ch, short *s, int len, int rate);
  78.  
  79. int mcpGetFreq6848(int note);
  80. int mcpGetFreq8363(int note);
  81. int mcpGetNote6848(int freq);
  82. int mcpGetNote8363(int freq);
  83.  
  84. extern unsigned long mcpMixMaxRate;
  85. extern unsigned long mcpMixProcRate;
  86. extern unsigned char mcpMixOpt;
  87.  
  88. extern void (*mcpIdle)();
  89.  
  90. #endif
  91.